package com.gowhere.mapper.system;

import com.gowhere.domain.Role;
import com.gowhere.domain.UserInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserInfoMapper {
    List<UserInfo> findAll();

    void save(UserInfo userInfo);

    UserInfo findById(String id);

    int delete(String id);


   List<Role> findRoleUserUid(String roleId);

    void deleteRole(String userId);

    void addRoleToUser(@Param("userId") String userId, @Param("roleId") String roleId);

    void updateStatus(@Param("uid") String uid, @Param("status") String status);


    List<UserInfo> findUserRole(String id);

    //o
    List<UserInfo> searchWithCondition(String condition);

    UserInfo findByUsernameAndPwd(@Param("username") String username, @Param("password") String password);

    UserInfo findByUsername(String username);

    void updatePassword(UserInfo user);

}


